package com.haiyu.manager.dao;

import com.haiyu.manager.dto.Category1DTO;
import com.haiyu.manager.dto.Category2DTO;
import com.haiyu.manager.dto.Category2SearchDTO;
import com.haiyu.manager.pojo.Category1;
import com.haiyu.manager.pojo.Category2;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mapper.MyMapper;

import java.util.List;

@Repository
public interface Category2Mapper extends MyMapper<Category2> {

    List<Category2DTO> getCategory2List(Category2SearchDTO category2SearchDTO);

    Category2 getCategory2ByName(@Param("category2Name")String category2Name,@Param("category2Id") Integer category2Id);

    int updateCategory2Status(@Param("category2Id") Integer category2Id,@Param("category2Label") Integer category2Label);

    int updateCategory2(Category2 category2);

    Category2 findByCategory2Name(@Param("Category2Name") String Category2Name);

    //int updatePwd(@Param("userName") String userName,@Param("password") String password);
    List<Category1DTO> getCategory2ByCategory1Name(String category1Name);
    List<Category2> getCategory2By1Id(@Param("category10Id") Integer category10Id);

    List<Category1DTO> getCategory1By2Id(@Param("category2Id") Integer category2Id);
}
